import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import Login from './views/Login.vue'
import one from './components/onePart/one'
import two from './components/onePart/two'
import three from './components/onePart/three'
import four from './components/onePart/four'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/home',
      name: 'home',
      component: Home,
      children: [
        {
          path: '/',
          component: one
        },
        {
          path: '/two',
          component: two
        },
        {
          path: '/three',
          component: three
        },
        {
          path: '/four',
          component: four
        }
      ]
    },
    {
      path: '/',
      name: 'login',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: Login
    }
  ]
})
